/*******************************************************************************
 * Copyright (c) 2011 LegSem.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Public License v3.0
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/gpl-3.0.txt
 * 
 * Contributors:
 *     LegSem - initial API and implementation
 ******************************************************************************/
package com.legstar.eci.xmi.model;

import java.util.List;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import com.thoughtworks.xstream.annotations.XStreamImplicit;

@XStreamAlias("definitions")
public class WsdlDefinitions {

    @XStreamAsAttribute
    private String name;

    @XStreamAsAttribute
    private String targetNamespace;

    @XStreamImplicit()
    private List < WsdlImport > imports;

    @XStreamImplicit()
    private List < WsdlBinding > bindings;

    /** {@inheritDoc} */
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("[");
        sb.append("name" + ":" + name + "");
        sb.append(",");
        sb.append("targetNamespace" + ":" + targetNamespace + "");
        sb.append(",");
        sb.append("imports" + ":" + imports + "");
        sb.append(",");
        sb.append("bindings" + ":" + bindings + "");
        sb.append("]");
        return sb.toString();
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @return the imports
     */
    public List < WsdlImport > getImports() {
        return imports;
    }

    /**
     * @return the bindings
     */
    public List < WsdlBinding > getBindings() {
        return bindings;
    }

    /**
     * @return the targetNamespace
     */
    public String getTargetNamespace() {
        return targetNamespace;
    }
}
